package com.atguigu.gmall.product.controller;

import com.atguigu.gmall.common.result.Result;
import com.atguigu.gmall.product.cron.SkuBloomTaskCron;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @Author 卡尼奶
 * @Date 2022/5/24 20:08
 * @Version 1.0
 */
@RestController
@RequestMapping("/admin/product")
public class SkuBloomController {

    @Autowired
    private SkuBloomTaskCron skuBloomTaskCron;


    @GetMapping("/restartBloom")
    public Result restartBloom(){
        skuBloomTaskCron.rebuildbloom();
        return Result.ok();
    }
}
